package org.example.design.interpreter.test2;

/**
 * @author huangshen
 * @version 0
 * @description 减法表达式实现类
 * @since 2022/2/14 15:29
 */
public class MinusOperation extends NonTerminalExpression {

    public MinusOperation(Expression e1, Expression e2) {
        super(e1, e2);
    }

    @Override
    public int interpreter(Context context) {
        return this.e1.interpreter(context) - this.e2.interpreter(context);
    }
}
